package api

import (
	"github.com/gin-gonic/gin"
	"gitee.com/xiaofengfeng123/srv-paper-tape/api/auth"
	"gitee.com/xiaofengfeng123/srv-paper-tape/api/comment"
	"gitee.com/xiaofengfeng123/srv-paper-tape/api/weapp"
	"gitee.com/xiaofengfeng123/srv-paper-tape/middleware"
)

func Init(parentRoute *gin.Engine){
	authRoute := parentRoute.Group("/paper-tape/v1")
	auth.AuthRoute(authRoute)
	comment.NoAuthRoute(authRoute)

	v1Route := parentRoute.Group("/paper-tape/v1",middleware.JWT())
	comment.Route(v1Route)
	weapp.Route(v1Route)
}